Assessment of exposure to drug use and psychosocial stress is complicated by the fact that each is often transient and difficult to recall accurately. Assessment of their causal connections with one another, and of their genetic and environmental determinants, is complicated by the complexity of the causal connections and by the elusive nature of what constitutes the environment. In this project, we are assessing drug use and psychosocial stress in near-real time through Ecological Momentary Assessment (EMA), in which participants use handheld electronic diaries to record events as they occur and to report recent or ongoing events in response to randomly timed prompts throughout the day. We are also maintaining real-time records of where the reported events occur by having participants carry Global Positioning System (GPS) loggers to track their whereabouts with a spatial resolution of several meters. We use these data collectively in a method we are calling Geographical Momentary Assessment (GMA). Our goal with GMA has little to do with knowing the specific Baltimore locations where drug-related behaviors occur, and everything to do with gaining generalizable knowledge about how activity spaces (the spaces in which daily activities occur) are associated with such behaviors and their precipitants. We have completed an initial pilot study of our GMA methods. We collected time-stamped GPS data and EMA ratings of mood, stress, and drug craving over 16 weeks at randomly prompted times during the waking hours of opioid-dependent polydrug users receiving methadone maintenance. Locations of EMA entries and participants travel tracks were calculated for the 12 hours before each EMA entry were mapped. Associations between subjective ratings and objective environmental ratings were evaluated at the whole neighborhood and 12-hour track levels. Participants (N=27) were compliant with GMA data collection; 3,711 randomly prompted EMA entries were matched to specific locations. At the neighborhood level, physical disorder was negatively correlated with negative mood, stress, and heroin and cocaine craving (ps <.0001 to .0335); drug activity was negatively correlated with stress, heroin and cocaine craving (ps .0009 to .0134). Similar relationships were found for the environments around respondents tracks in the 12 hours preceding EMA entries. The results support the feasibility of GMA. The relationships between neighborhood characteristics and participants reports were counterintuitive and counter-hypothesized, and challenge some assumptions about how ostensibly stressful environments are associated with lived experience and how such environments ultimately impair health. GMA methodology may have applications for development of individual- or neighborhood-level interventions. We are continuing this work in a larger population of opioid/cocaine users in opioid agonist maintenance. This larger sample will enable us to investigate the relationships among individual characteristics and environmental influences on drug use. We are also developing more sophisticated methods for interpolating observer ratings between specific rated locations, better approaches to the generation of scores and maps from raw observer rating scores, and more sensitive approaches to modeling associations between momentary surroundings and mood, craving, and stress, taking advantage of our larger number of participants. As part of this larger trial, we are collaborating with the developers of AutoSense, a wireless sensor system that continuously measures heart rate, heart-rate variability, respiration, skin conductance, ambient temperature, and physical activity with biosensors that transmit data to a smartphone. Data from our study and from other AutoSense collaborations are being used to develop algorithms that can detect drug use, smoking, and stress. We field-tested AutoSense in 40 polydrug users during outpatient methadone maintenance who wore AutoSense for 4 one-week periods, during which they also self-reported drug use, stressful events, mood, and activities on handheld devices as they went about their daily lives. Urine drug screens were conducted 3 times weekly. Compliance with and acceptability of AutoSense was good; rates of wireless ECG data yield were acceptable (85.7%). That compliance of our participants compared favorably with that of a group of 30 students (smokers and social drinkers) who wore AutoSense for 1 week. One major goal of our ambulatory physiological monitoring (currently with AutoSense, but sure to evolve as biosensing technology improves) is to detect drug use in real time with minimal reporting burden for patients. With our AutoSense collaborators, we have established proof of principle. The major challenge was to develop physiologically informed computational models (e.g., for inferring an episode of cocaine use) that can work reliably in natural environments using ambulatory ECG. With our collaborators, we analyed AutoSense data collected in the field and from laboratory studies with administration of cocaine. With these data, we developed efficient methods to screen and clean the ECG time-series data and extract candidate time windows based on EMA self-reports. The resultant model achieved a 100% rate of true positives while keeping false positives to 1.13/day over 11+ hours/day of field data. This is a major step toward a key component of a mobile health intervention, which could prevent a lapse from devolving into a relapse.